var path = require('path');
var express = require('express');
var router = express.Router();

router.get('/', function (req, res) {
    res.sendFile(path.resolve(__dirname,  '../../src/views/index.html'));
})

router.get('*', function(req, res, next) {
    var reg = /^\/(css|js|views)/i;
    if (reg.test(req.path)) {
        next();
    } else {
        res.sendFile(path.resolve(__dirname,  '../../src/views/404.html'));
    }
})
module.exports = router;